#include <stdio.h>

int
main(void)
{
	int num = 0;

	scanf("%d", &num);
	printf("%s\n", (num & (num - 1)) ? "NO" : "YES");

	return 0;
}
